home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 4.2 / arexx / editor / oz / 1-volume < prev    next >
Text File  |  1998-04-16  |  2KB  |  69 lines

  1. /* 1-Volume.rexx V1.3 -- Changes the audio volumes of a single crouton (Video clip w/AUDIO or Just AUDIO Clip).  Simply saves having to repeatedly open a Fine Tune Window.
  2.  
  3. To use: highlight a clip and run this ARexx program.*/
  4.  
  5. /*  By Aussie - ©1995 Michael Holten          */
  6.  
  7. call remlib('PROJECT_REXX_PORT')
  8. call addlib('PROJECT_REXX_PORT',0)
  9.  
  10. start_loc=croutonspot()
  11. current_spot=start_loc
  12. highvol=0
  13. call croutonpick(current_spot)
  14.  
  15. /* --- wait for any screen update delay --- */
  16. call time('R')
  17. do while (time('E')<0.5)
  18.     end
  19.  
  20. call req_open("Volumes  -  by Aussie","---------------------------","  This routine will change the volume of the selected clip  ","  without having to open a Fine-Tune window first.  ")
  21.  
  22. test= (croutontype()="CLIP") | (croutontype()=" AUD") 
  23. if test=0 then do
  24.    call req_tell("<< Canceled >>","        You must first highlight"," a VIDEO or AUDIO clip (not a still).")
  25.    call quit2()
  26.    end
  27. test=croutongettag(AUDIOON)
  28. if test=0 then do
  29.    call req_tell("<< Canceled >>","        This clip has no Audio!")
  30.    call quit2()
  31.    end
  32.  
  33. vol1M=croutongettag(AUDIOVOLUME1)
  34. vol2M=croutongettag(AUDIOVOLUME2)
  35.  
  36. vol1=((vol1M/655.35)+0.5)%1
  37. if vol1<0 then vol1=0
  38. if vol1>100 then vol1=100
  39. vol2=((vol2M/655.35)+0.5)%1
  40. if vol2<0 then vol2=0
  41. if vol2>100 then vol2=100
  42.  
  43. if vol1>highvol then highvol=vol1
  44. if vol2>highvol then highvol=vol2
  45.  
  46.  
  47. volume=req_number("Current volume:" highvol,highvol,0,100)
  48. if volume="CANCEL" then call quit2()
  49. call req_close()
  50.  
  51. if volume~= highvol then do
  52.    vol1=volume
  53.    vol1=vol1*655.35
  54.    call croutonsettag(AUDIOVOLUME1,vol1)
  55.    vol2=volume
  56.    vol2=vol2*655.35
  57.    call croutonsettag(AUDIOVOLUME2,vol2)
  58.    end
  59. call req_error(" OZ:  Audio volume has changed to "||volume)
  60. call remlib("PROJECT_REXX_PORT")
  61. exit
  62.  
  63.  
  64. quit2:
  65. call req_close()
  66. call req_error("OZ:  <<< Last Operation Canceled >>>")
  67. call remlib("PROJECT_REXX_PORT")
  68. exit
  69.